package com.manor.paradise.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.manor.common.utils.content
import com.manor.paradise.R
import com.manor.paradise.bean.HoneyBean
import kotlinx.android.synthetic.main.lyb_item_task_details.view.*
import java.math.BigDecimal

class LybTaskDetailsAdapter(data: ArrayList<HoneyBean.RecordsBean>?) : BaseQuickAdapter<HoneyBean.RecordsBean, BaseViewHolder>(R.layout.lyb_item_task_details, data) {


    override fun convert(holder: BaseViewHolder, item: HoneyBean.RecordsBean) {
        holder.itemView.sTaskCountTv.content(item.taskSize)
        holder.itemView.sTaskTimeTv.content(item.createTime)
        holder.itemView.sTaskProgressTv.content(item.taskSize.divide(item.totalSize,2,BigDecimal.ROUND_DOWN).multiply(BigDecimal("100")).intValueExact().toString()+"%")
    }

}




